﻿<%@ Page Title="" Language="C#" MasterPageFile="~/master/Site.Master" AutoEventWireup="true"
	CodeBehind="RoleManagement.aspx.cs" Inherits="Hematology.UserSite.admin.RoleManagement" %>

<%@ Import Namespace="Hematology.Tools" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphRecent" runat="server">
	<hmt:PageTitle runat="server" ID="ptTitle" Text='<%$ Resources:UserSite, resRoleManagement %>'
		ButtonText='<%$ Resources:UserSite, resWhitespace %>' ButtonCssClass="plus" ShowButton="True"
		TitleButtonType="Hyperlink" NavigateUrl="/admin/RoleManagement.aspx?view=Add" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphHeadNews" runat="server">
	<div class="userFullPageContainer">
		<asp:MultiView runat="server" ID="mvRoles">
			<asp:View runat="server" ID="vRoleList">
				<asp:Repeater runat="server" ID="rptAccessRole" OnItemCommand="rptAccessRole_ItemCommand">
					<HeaderTemplate>
						<div class="adminTableBlock">
							<div class="adminTableRow adminTableRowHeader">
								<div class="adminTableRow200">
									<asp:Label ID="lRoleNameHdr" runat="server" Text='<%$ Resources:UserSite, resRoleName %>' />
								</div>
								<div class="adminTableRow400">
									<asp:Label ID="lRoleDescriptionHdr" runat="server" Text='<%$ Resources:UserSite, resRoleDescription %>' />
								</div>
								<div class="adminTableRowDate">
									<asp:Label ID="lRoleCreatedDateHdr" runat="server" Text='<%$ Resources:UserSite, resDateCreated %>' />
								</div>
							</div>
					</HeaderTemplate>
					<ItemTemplate>
						<div class="adminTableRow">
							<div class="adminTableRow200">
								<asp:Label ID="lRoleName" runat="server" Text='<%# Eval("Name") %>' />
							</div>
							<div class="adminTableRow400">
								<asp:Label ID="lRoleDescription" runat="server" Text='<%# Eval("Description") %>' />
							</div>
							<div class="adminTableRowDate">
								<asp:Label ID="lRoleCreatedDate" runat="server" Text='<%# PageHelper.SetDateCellContent(Eval("CreateDate")) %>' />
							</div>
							<div class="adminTableRowIconBlock">
								<div class="adminTableRowIcon">
									<asp:HyperLink ID="btnEditRole" runat="server" NavigateUrl='<%# string.Format("/admin/RoleManagement.aspx?view=Edit&id={0}", Eval("RoleId")) %>'
										ToolTip="Правка" CssClass="adminTableRowEdit" />
								</div>
								<div class="adminTableRowIcon">
									<asp:LinkButton ID="btnDeleteRole" runat="server" ToolTip="Удалить" CommandName="DeleteRole"
										CommandArgument='<%# Eval("RoleId") %>' OnClientClick="return confirm('Подтвердите удаление')"
										CssClass="adminTableRowDelete" />
								</div>
							</div>
						</div>
					</ItemTemplate>
					<FooterTemplate>
						</div> </div>
						<div style="clear: both;">
					</FooterTemplate>
				</asp:Repeater>
			</asp:View>
			<asp:View runat="server" ID="vRoleEdit">
				<div class="editorBlock">
					<div class="editorBlockEditControl">
						<div class="editorBlockTitle">
							<asp:Label runat="server" ID="lblRoleName" Text='<%$ Resources:UserSite, resRoleName %>' />
							<span class="asterisk">
								<asp:Label runat="server" ID="lblRoleNameAsterisk" Text='<%$ Resources:UserSite, resAsterisk %>' />
							</span>
						</div>
						<div class="editorBlockControl">
							<asp:TextBox runat="server" ID="txtRoleName" MaxLength="50" />
							<asp:RequiredFieldValidator ID="vldRoleNameIsRequired" runat="server" ControlToValidate="txtRoleName"
								ErrorMessage='<%$ Resources:UserSite, resRoleNameIsRequired %>' Display="None"
								ValidationGroup="vgEditRole" SetFocusOnError="true" />
						</div>
					</div>
					<div class="editorBlockEditControl">
						<div class="editorBlockTitle">
							<asp:Label runat="server" ID="lblRoleDescription" Text='<%$ Resources:UserSite, resRoleDescription %>' />
						</div>
						<div class="editorBlockControl">
							<asp:TextBox runat="server" ID="txtRoleDescription" MaxLength="250" />
						</div>
					</div>
					<div class="editorBlockButton">
						<asp:Button runat="server" ID="btnSaveRole" Text='<%$ Resources:UserSite, resSaveRole %>'
							OnClick="btnSaveRole_Click" ValidationGroup="vgEditRole" />
						<asp:Button runat="server" ID="btnList" Text='<%$ Resources:UserSite, resToList %>'
							OnClick="btnList_Click" />
						<asp:ValidationSummary runat="server" ID="vsEditRole" DisplayMode="BulletList" ValidationGroup="vgEditRole"
							ShowMessageBox="True" ShowSummary="False" />
					</div>
				</div>
			</asp:View>
		</asp:MultiView>
	</div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="cphBody" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="cphPanel" runat="server">
</asp:Content>
